package company.permissionsystem.service;

import company.permissionsystem.dao.PositionDao;
import company.permissionsystem.model.entity.Position;
import company.permissionsystem.model.entity.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PositionService {

    @Autowired
    private PositionDao positionDao;

    public Position findPositionById(Integer id) {
        return positionDao.findPositionById(id);
    }

    public List<Position> findAllPositon() {
        return positionDao.findAllPositon();
    }

    public List<SysUser> findEmployeeByPositionId(Long id) {
        return positionDao.findEmployeeByPositionId(id);
    }
}
